<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes">
<title>会员首页</title>
<link rel="stylesheet" type="text/css" href="/static/css/style.css">
<link rel="stylesheet" type="text/css" href="/static/css/shoujisc.css">
<script type="text/javascript" src="/static/js/jquery-2.0.0.min.js"></script>
<script type="text/javascript" src="/static/js/woxiangyao.js"></script>


<script type="text/javascript" src="/static/js/myinit.js"></script>
<script type="text/javascript" src="/static/js/cook_shop_cart.js"></script>	
</head>

<body>
	
    
       
   
    
    <div class="me-tu" style="position:relative;">
    	<div style="margin-left:-40px;left:50%;position:absolute;height:80px;width:80px;background-color:#FFF;margin-top:-40px;top:40%;border-radius:100px;background-position:center;background-repeat:no-repeat;background-size:cover;" id="headimg"></div>
        
        
        <div style="width:100%;position:absolute;bottom:20px;text-align:center;color:white" id="weixinname"></div>
    	<a href="#"><img src="/static/img/sjsc24.jpg"></a>
    </div>
    
    <ul class="me-ul1">
		<li  id="tomyorders" style="border-bottom: 1px solid rgb(245, 245, 245); background: rgb(255, 255, 255) none repeat scroll 0% 0%; height: 50px; line-height: 50px;color:#656565"><img src="/static/img/wodedindan.png" style="float:left;width:30px;margin-top:10px;margin-left:6px;"><a style="float:left;height:50px;line-height: 50px;margin-left:6px;font-size:16px"  >我的订单</a><span style="color: rgb(213, 213, 213); font-family: &quot;宋体&quot;; float: right; font-size: 20px; margin-right: 10px;">&gt;</span></li>
        
        <li  id="wodeshoucang" style="border-bottom: 1px solid rgb(245, 245, 245); background: rgb(255, 255, 255) none repeat scroll 0% 0%; height: 50px; line-height: 50px;color:#656565"><img src="/static/img/star_light.png" style="float:left;width:30px;margin-top:10px;margin-left:6px;"><a style="float:left;height:50px;line-height: 50px;margin-left:6px;font-size:16px"  >我的收藏</a><span style="color: rgb(213, 213, 213); font-family: &quot;宋体&quot;; float: right; font-size: 20px; margin-right: 10px;">&gt;</span></li>
		
		
		<li  id="chengweihuiyuan" style="border-bottom: 1px solid rgb(245, 245, 245); background: rgb(255, 255, 255) none repeat scroll 0% 0%; height: 50px; line-height: 50px;color:#656565"><img src="/static/img/gerenxinxi.png" style="float:left;width:30px;margin-top:10px;margin-left:6px;"><a style="float:left;height:50px;line-height: 50px;margin-left:6px;font-size:16px"  >成为会员</a><span style="color: rgb(213, 213, 213); font-family: &quot;宋体&quot;; float: right; font-size: 20px; margin-right: 10px;">&gt;</span></li>
		
		<li  id="youhuiquan" style="border-bottom: 1px solid rgb(245, 245, 245); background: rgb(255, 255, 255) none repeat scroll 0% 0%; height: 50px; line-height: 50px;color:#656565"><img src="/static/img/youhuiquan.png" style="float:left;width:30px;margin-top:10px;margin-left:6px;"><a style="float:left;height:50px;line-height: 50px;margin-left:6px;font-size:16px"  >优惠卡券</a><span style="color: rgb(213, 213, 213); font-family: &quot;宋体&quot;; float: right; font-size: 20px; margin-right: 10px;">&gt;</span></li>
		
		<li  id="xianjinzhanghu" style="border-bottom: 1px solid rgb(245, 245, 245); background: rgb(255, 255, 255) none repeat scroll 0% 0%; height: 50px; line-height: 50px;color:#656565"><img src="/static/img/xianjinzhanghu.png" style="float:left;width:30px;margin-top:10px;margin-left:6px;"><a style="float:left;height:50px;line-height: 50px;margin-left:6px;font-size:16px"  >我的充值</a><span style="color: rgb(213, 213, 213); font-family: &quot;宋体&quot;; float: right; font-size: 20px; margin-right: 10px;">&gt;</span></li>
		
		<li  id="shouhuodizhi" style="border-bottom: 1px solid rgb(245, 245, 245); background: rgb(255, 255, 255) none repeat scroll 0% 0%; height: 50px; line-height: 50px;color:#656565"><img src="/static/img/shouhuodizhi.png" style="float:left;width:30px;margin-top:10px;margin-left:6px;"><a style="float:left;height:50px;line-height: 50px;margin-left:6px;font-size:16px"  >收货地址</a><span style="color: rgb(213, 213, 213); font-family: &quot;宋体&quot;; float: right; font-size: 20px; margin-right: 10px;">&gt;</span></li>
		
		<li  id="shezhi" style="border-bottom: 1px solid rgb(245, 245, 245); background: rgb(255, 255, 255) none repeat scroll 0% 0%; height: 50px; line-height: 50px;color:#656565"><img src="/static/img/shezhi.png" style="float:left;width:30px;margin-top:10px;margin-left:6px;"><a style="float:left;height:50px;line-height: 50px;margin-left:6px;font-size:16px"  >账号设置</a><span style="color: rgb(213, 213, 213); font-family: &quot;宋体&quot;; float: right; font-size: 20px; margin-right: 10px;">&gt;</span></li>
    	 
		
    </ul>
    
   <ul class="quanbu-ul1" id="bottom_menu">
			<li  id="toindex">
				<div class="qu-tu1"> <a  class="atu1"><img src="/static/img/sjsc-02.png"></a> <a  class="atu2"><img src="/static/img/shouye.png"></a> </div>
				<a class="qu-ul1a" style="color:#313131;">首页</a> </li>
			<li>
				<div class="qu-tu1"> <a href="#" class="atu1"><img src="/static/img/sjsc-16.png"></a> <a href="#" class="atu2"><img src="/static/img/sjsc-16-1.png"></a> </div>
				<a href="#" class="qu-ul1a" style="color:#313131">客服在线</a> </li>
			<li style="position:relative" id="toshoppindlist">
			<div style=" background-color: rgb(210, 36, 36); border-radius: 50px; width: 12px; height: 12px; text-align: center; line-height: 12px; font-size:8px;font-weight:lighter;color: white; right: 25%;position:absolute;display:none;text-shadow:none" id="cart_total"></div>
				<div class="qu-tu1"> <a class="atu1"><img src="/static/img/sjsc-17.png"></a> <a class="atu2"><img src="/static/img/sjsc-17-1.png"></a> </div>
				<a class="qu-ul1a" style="color:#313131">购物车</a> 
				
				
				</li>
			<li class="current"  id="towode">
				<div class="qu-tu1"> <a  class="atu1"><img src="/static/img/sjsc-18.png"></a> <a   class="atu2"><img src="/static/img/sjsc18-1.png"></a> </div>
				<a  class="qu-ul1a" style="color:#313131 ">我的</a> </li>
			<div style="clear:both;"></div>
		</ul>
	
	<script type="text/javascript">
		var code = getUrldata('code');
		var openid='';
		$.ajaxSettings.async = false;
		
		$.post('/weixin/getopenid/',{"code":code},function(aa){
			openid=aa.openid;
		}, "json");
		
		$('#youhuiquan').click(function(e) {
            document.location.href="wodeyouhuijuan.html?OPENID="+openid;
        });

	 
	 
		
		
		$('#tomyorders').click(function(){
			window.location.href="wodedingdan.html?code="+code;
		});
		
		$('#towode').click(function(){
			document.location.reload();
		});
		
		$('#toindex').click(function(){
			document.location.href="index.html?code="+code;
		});
		
		$('#toshoppindlist').click(function(e) {
			document.location.href="shoppinglist.html?OPENID="+openid;
            
        });
		
		$('#shouhuodizhi').click(function(){
			document.location.href="shouhuodizhi.html?OPENID="+openid;
			 

	 
	 
			
		});
		$('#xianjinzhanghu').click(function(){
			document.location.href="xianjinzhanghu.html?OPENID="+openid;
		});
		
		
		
		
		function getWeixin(){
			$.post('/weixin/getopenid/',{"code":code},function(aa){
				$.post('/weixin/getCustinfo/',{"openid":aa.openid},function(rs){
					console.log(rs);
					$('#headimg').css('background-image','url("'+rs.headimgurl+'")');
					$('#weixinname').html(rs.nickname);
					
				},'json');
			}, "json");
			
		}
		
		
		$(document).ready(function(e) {
			getWeixin();
			refreshCartTotal();
      	      
        });
		
		
	function refreshCartTotal(){
		var num=cartHelper.getCart().count;
		if(num>0){
			$('#cart_total').html(num);
			$('#cart_total').show();
		}else{
			$('#cart_total').hide();
		}
	}
	
	$('#chengweihuiyuan').click(function(e) {
        document.location.href="zhuce.html?OPENID="+openid;
    });
	$('#wodeshoucang').click(function(e){
		document.location.href="myshoucang.html?OPENID="+openid;
	});
	
	</script>
    
</body>
</html>
